const HtmlWebpackPlugin = require("html-webpack-plugin");
const { resolve } = require("path");
 
 
 module.exports = {
     entry:'./src/index.js',
     output:{
         filename:'built.js',
         path:resolve(__dirname,'build'),
     },
     plugins:[
         new HtmlWebpackPlugin({
             template:'./src/index.html'
         })
     ],
     //生产环境会自动压缩js文件
     mode:'production',
 }